import React,{useEffect} from "react";
import {Layout} from "antd";
import IndexHeader from "./commponents/IndexHeader";
import IndexSider from "./commponents/IndexSider";
import IndexContent from "./commponents/IndexContent";
import IndexFooter from "./commponents/IndexFooter";
import { useAppDispatch} from "@/hooks";
import { getInfoAsync } from "@/store/slice/auth";
import "./index.less";

const Index: React.FC = () => {
    const dispatch = useAppDispatch();
    useEffect(()=>{
        dispatch(getInfoAsync());
    },[])
    return (
        <Layout style={{ minHeight: '100vh' }}>
            <IndexSider/>
            <Layout className="site-layout">
            <IndexHeader/>
            <IndexContent/>
            <IndexFooter/>
            </Layout>
        </Layout>
    );
};

export default Index;